package com.autotest.nore.dto;

import lombok.Getter;
import lombok.Setter;

import java.util.List;
@Getter
@Setter
public class PlanDTO {
    private String id;
    private String name;
    private String description;
    private String projectId;
    private String createUser;
    private String updateUser;
    private Long createTime;
    private Long updateTime;
    private String userName;
    private Integer status;
    private List<PlanCollectionDTO> planCollections;
    private String cronExpression;
    private String environmentId;

    // 判断是否是可执行的任务
    public boolean isRunnable() {
        return status != null && status == 1
                && cronExpression != null && !cronExpression.trim().isEmpty();
    }
}
